/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.assignment1.service.Impl;

import com.assignment1.service.Assignment1Service;
import java.util.ArrayList;

/**
 *
 * @author ASUS
 */
public class Assignment1Impl implements Assignment1Service{

    @Override
    public int add(int a, int b) {
        return a+b;
    }

    @Override
    public String getGender() {
        String John = "Male";
        String Mary = "Female";
        String Boy = "Male";
        
        if(Boy == "Male" && John == Boy)
        {
            System.out.println("John is a boy");
        }
        else
        {
            System.out.println("John is not a boy");
        }
        
        return John;
    }

    @Override
    public float floatM() {
        float x = (float)10;
        float y = (float)2;
        
        float ans;
        ans = x + y;
        return ans;
    }

    @Override
    public void getTimeOut() {
        System.out.println("Hello Java2EE");
    }

    @Override
    public void getArrayDetails() {
        ArrayList<String> name = new ArrayList<String>();
        name.add("Lerato");
        name.add("Cape");
    }

    @Override
    public String testEquality() {
        String a = "abc";
        String b = new String(a);
        
        return b;
    }

}
